package city.spring.modules.oldman.repository;

import city.spring.modules.oldman.entity.OldmanComplaintEntity;
import city.spring.modules.oldman.vo.OldmanComplaintVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 存储库：投诉
 *
 * @author pxm
 * @date 2020-06-22 10:43:20
 */
@Repository
public interface OldmanComplaintRepository extends BaseMapper<OldmanComplaintEntity> {
    void updateHandle(@Param("id") String id, @Param("entity") OldmanComplaintEntity entity);

    void updateReview(@Param("id") String id, @Param("entity") OldmanComplaintEntity entity);

    /**
     * 分页获取投诉记录
     *
     * @param page    分页对象
     * @param wrapper 查询对象
     * @return 投诉记录
     */
    IPage<OldmanComplaintVO> listPage(Page<? extends OldmanComplaintEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends OldmanComplaintEntity> wrapper);

}